import { lazy } from "react";

export let mainrouter = [
  {
    path: "/index/earts",
    element: lazy(() => import("../page/index/Echarts")),
    title: "画图",
    icon: "UploadOutlined",
  },
  {
    path: "/index/home",
    element: lazy(() => import("../page/index/Home")),
    title: "首页",
    icon: "UserOutlined",
  },
  {
    path: "/index/my",
    element: lazy(() => import("../page/index/My")),
    title: "我的",
    icon: "VideoCameraOutlined",
  },
  {
    path: "/index/table",
    element: lazy(() => import("../page/index/Table")),
    title: "表格",
    icon: "TeamOutlined",
  },
];
const routes = [
  {
    path: "/index",
    element: lazy(() => import("../page/Index")),
    children: mainrouter,
  },
  {
    path: "*",
    element: lazy(() => import("../page/Error")),
  },
  {
    path: "/login",
    element: lazy(() => import("../page/Login")),
  },
  {
    path: "/",
    to: "/index/home",
  },
  {
    path: "/deils/:id",
    element: lazy(() => import("../page/Deils")),
  },
];
export default routes;
